package com.tosee.model.dbTosee;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Classe représentant une saison .
 * 
 * @author robint
 */

@Entity
@Table(name = "T_SAISON_SSN")
public class Saison {

    /**
     * Identifiant.
     */
    @Id
    @Column(name = "SSN_ID", nullable = false, unique = true)
    @GeneratedValue
    private int id;

    /**
     * numero
     */
    @Column(name = "SSN_NUMERO", nullable = true, unique = false)
    private Integer numero;

    /**
     * annee
     */
    @Column(name = "SSN_ANNEE", nullable = true, unique = false)
    private String annee;

    /**
     * idAllocine
     */
    @Column(name = "SSN_ID_ALLOCINE", nullable = false, unique = true)
    private Integer codeAllocine;

    /**
     * serie
     */
    @ManyToOne
    @JoinColumn(name = "SRE_ID")
    private Serie serie;

    /***
     * Constructeur par défaut.
     */
    public Saison() {
        super();
    }

    /**
     * Constructeur.
     * 
     * @param _id id
     */
    public Saison(int _id) {
        super();
        this.id = _id;
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the numero
     */
    public Integer getNumero() {
        return numero;
    }

    /**
     * @param numero the numero to set
     */
    public void setNumero(Integer numero) {
        this.numero = numero;
    }

    /**
     * @return the annee
     */
    public String getAnnee() {
        return annee;
    }

    /**
     * @param annee the annee to set
     */
    public void setAnnee(String annee) {
        this.annee = annee;
    }

    /**
     * @return the serie
     */
    public Serie getSerie() {
        return serie;
    }

    /**
     * @param serie the serie to set
     */
    public void setSerie(Serie serie) {
        this.serie = serie;
    }

    /**
     * @return the codeAllocine
     */
    public Integer getCodeAllocine() {
        return codeAllocine;
    }

    /**
     * @param codeAllocine the codeAllocine to set
     */
    public void setCodeAllocine(Integer codeAllocine) {
        this.codeAllocine = codeAllocine;
    }

}
